﻿Imports System.IO

Public Class AppLogger
    Shared Sub LogMessage(ByVal msg As String)
        Dim sf As StreamWriter
        Dim file As String

        Try
            file = AppDomain.CurrentDomain.BaseDirectory & "\TmpReport\logfile.txt"
            sf = FileIO.FileSystem.OpenTextFileWriter(file, True)
            sf.WriteLine(Date.Now & " : " & msg)
            sf.Flush()
            sf.Close()
        Catch ex As Exception
            sf = Nothing
        End Try
        sf = Nothing
    End Sub
End Class